<?php

if(!empty($_POST))
{
	
	$re = insert('newscate', $_POST);
	if($re)
	{
		echo '添加成功';
		header('Refresh:1;index.php?a=admin&b=newscate&c=index');
		die;
	}
	else
	{
		echo '添加失败';
		header('Refresh:1;index.php?a=admin&b=newscate&c=add');
		die;
	}	
}
$cate = selectAll('newscate');

include('app/admin/newscate/html/add.html');
?>